﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using SocialLearning;

namespace SocialLearning.CoreInterfaces
{
    public interface I_CMA_ModuleImplementation
    {
        // This is used by the core when loading the module:
        void LoadModule(I_CMA_Core core);

        // Called when the user exits (sometimes):
        void UnloadModule();
    }

    public interface I_CMA_Core
    {
        // Gets the user data of the currently logged in user:
        I_UAC_Account User { get; }

        // Use this in exactly the same way as the WCF service.
        // It allows modules to access each other's methods.
        object InvokeMethod(string module, string method, object[] parameters);

        // Get all loaded modules:
        string[] GetModuleList();

        // Get all methods in a given module:
        string[] GetMethodList(string module);

        // Send a certain ping to all registered clients:
        void BroadcastPing(int pingType, string pingData);
    }
}
